-
-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OutdatedDocumentation - Detect param which private property documented as property #6372
OutdatedDocumentation - Detect param which private property documented as property #6372
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6372 +/- ##
=========================================
Coverage 85.16% 85.16%
+ Complexity 4010 4009 -1
=========================================
Files 570 570
Lines 13401 13398 -3
Branches 2363 2361 -2
=========================================
- Hits 11413 11411 -2
- Misses 834 835 +1
+ Partials 1154 1152 -2
|
@@ -147,7 +148,7 @@ class OutdatedDocumentation(config: Config = Config.empty) : Rule(config) { | |||
private fun getDeclarationsForValueParameters(valueParameters: List<KtParameter>): List<Declaration> { | |||
return valueParameters.mapNotNull { | |||
it.name?.let { name -> | |||
val type = if (it.isPropertyParameter()) { | |||
val type = if (it.isPropertyParameter() && it.isPublic) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably !private? because protected is also public API. internal
is arguable, but there are still external users outside the component itself, so docs are recomended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch.. updated the logic. Thanks
cb1c3ab
to
148a8b7
Compare
…d as property (#6372) * Detect param which private property documented as property * Use not of private instead of public
Behavior change from detekt/detekt#6372.
Behavior change from detekt/detekt#6372.
Behavior change from detekt/detekt#6372.
Behavior change from detekt/detekt#6372.
…d as property (detekt#6372) * Detect param which private property documented as property * Use not of private instead of public
Fixes #6371